<?php
/**
 * Nweb Framework
 *
 * This script is protected by copyright. It's use, copying, modification
 * and distribution without written consent of the author is prohibited.
 *
 * @category    source
 * @package     pl.nweb.framework.config
 * @subpackage  adapter
 * @author      Krzysztof Kardasz <krzysztof.kardasz@gmail.com>
 * @copyright   Copyright (c) 2011 Krzysztof Kardasz
 * @license     http://www.gnu.org/licenses/lgpl-3.0.txt  GNU Lesser General Public
 * @version     3.0 $Id$
 * @link        http://code.google.com/p/nweb-framework/
 * @link        http://framework.nweb.pl
 */

namespace pl\nweb\framework\config;

/**
 * Adapter
 * 
 * @category    source
 * @package     pl.nweb.framework.config
 * @subpackage  adapter
 * @author      Krzysztof Kardasz <krzysztof.kardasz@gmail.com>
 * @copyright   Copyright (c) 2011 Krzysztof Kardasz
 * @version     3.0 $Id$
 */
abstract class Adapter extends \pl\nweb\framework\Config implements iAdapter
{
    /**
     * Konstruktor
     * 
     * @param string $file plik
     * @throws Exception
     */
    public function __construct ($file)
    {
        if(!$data = $this->read($file)) {
            throw new Exception ('File "' . $file . '" not found');
        }
        parent::__construct($data);
    }
}